package com.chookss.home.adapter;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.chookss.R;
import com.chookss.Urls;
import com.chookss.WebCommonActivity;
import com.chookss.base.StaticClass;
import com.chookss.home.NavigationBaseActivity;
import com.chookss.home.entity.NavigationEntity;
import com.chookss.home.other.MoreFunctionActivity;
import com.chookss.tools.GlideUtils;
import com.chookss.tools.NavigationTools;
import com.chookss.video.VideoBaseActivity;
import com.chookss.view.NumImageView;
import com.johnrambo.ktea.ktExtends.ShareUtils;

import java.util.ArrayList;

public class PublishAdapter extends BaseQuickAdapter<NavigationEntity, BaseViewHolder> {
    private Context mContext;
    private ArrayList<NavigationEntity> data;

    public PublishAdapter(int layoutResId, Context context, @io.reactivex.annotations.Nullable ArrayList<NavigationEntity> data) {
        super(layoutResId, data);
        this.mContext = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, NavigationEntity entity) {
        ImageView ivPublish = helper.getView(R.id.ivPublish);
        TextView tvPublish = helper.getView(R.id.tvPublish);
        tvPublish.setText(entity.getNavigationName());
        Glide.with(mContext).load(entity.getLocalUrl()).into(ivPublish);
    }
}
